﻿<%@ Page Title="Asignar Clientes a Cartera" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmClienteCartera.aspx.cs" Inherits="Crosland.Automotriz.Web.CRM.wFrmClienteCartera" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">

    <script type="text/javascript">

        function pageLoad() {

            var control = document.getElementById('ctl00_cphMain_hfIndicador2');
            cambiarImagenHeader();

            if (control.value == 'S') {
                $find('<%= ((AjaxControlToolkit.CollapsiblePanelExtender)this.Master.FindControl("cpeMenuGeneral")).BehaviorID %>')._doClose();

                control.value = 'N';
            }
        }

</script>

<div class="main-header" style="width:100%;">
            <div class="main-titulo" style="text-align: left">Asignar Clientes a Cartera</div>
          </div>
          <asp:HiddenField ID="hfIndicador2" runat="server" Value="S" />

    <div style="padding: 10px">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td style="height: 30px" colspan="6">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td width="110">
                                <dx:ASPxButton ID="btnNuevo" runat="server" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" Height="30px" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Nuevo" 
                                    Width="100px" onclick="btnNuevo_Click">
                                    <Image Url="~/Images/bt_new_button.gif">
                                    </Image>
                                </dx:ASPxButton>
                            </td>
                            <td width="115">
                                <dx:ASPxButton ID="btnModificar" runat="server" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" Height="30px" onclick="btnModificar_Click" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Modificar" 
                                    Width="100px">
                                    <Image Url="~/Images/edit.gif">
                                    </Image>
                                </dx:ASPxButton>
                            </td>
                            <td>
                                <dx:ASPxButton ID="btnSalir" runat="server" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" Height="30px" onclick="btnSalir_Click" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Salir" 
                                    Width="100px">
                                    <Image Url="~/Images/logout.png">
                                    </Image>
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td style="height: 15px" colspan="6">
                    <hr />
                </td>
            </tr>
            <tr>
                <td style="width: 161px; height: 5px">
                </td>
                <td style="height: 5px" width="210">
                </td>
                <td style="height: 5px; width: 52px">
                </td>
                <td style="height: 5px" width="210">
                </td>
                <td style="height: 5px; width: 144px">
                </td>
                <td style="height: 5px" width="275">
                </td>
            </tr>
            <tr>
                <td style="width: 161px; height: 30px">
                    <asp:Label ID="Label1" runat="server" Text="Organización de Venta:" 
                        Font-Bold="True" ForeColor="Black"></asp:Label>
                </td>
                <td style="height: 30px" width="210">
                    <dx:ASPxComboBox ID="cboOrganizacion" runat="server" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue" Height="30px" Spacing="0" 
                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                        Width="200px" AutoPostBack="True" 
                        onselectedindexchanged="cboOrganizacion_SelectedIndexChanged">
                        <ItemStyle Height="30px" />
                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                        </LoadingPanelImage>
                        <LoadingPanelStyle ImageSpacing="5px">
                        </LoadingPanelStyle>
                        <ButtonStyle Width="20px">
                        </ButtonStyle>
                        <Paddings PaddingLeft="5px" />
                    </dx:ASPxComboBox>
                </td>
                <td style="height: 30px; width: 52px">
                    <asp:Label ID="Label2" runat="server" Text="Canal:" Font-Bold="True" 
                        ForeColor="Black"></asp:Label>
                </td>
                <td style="height: 30px" width="210">
                    <dx:ASPxComboBox ID="cboCanal" runat="server" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue" Height="30px" Spacing="0" 
                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                        Width="200px" AutoPostBack="True" 
                        onselectedindexchanged="cboCanal_SelectedIndexChanged">
                        <ItemStyle Height="30px" />
                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                        </LoadingPanelImage>
                        <LoadingPanelStyle ImageSpacing="5px">
                        </LoadingPanelStyle>
                        <DropDownButton Width="20px">
                        </DropDownButton>
                        <ButtonStyle Width="13px">
                        </ButtonStyle>
                        <Paddings PaddingLeft="5px" />
                    </dx:ASPxComboBox>
                </td>
                <td style="height: 30px; width: 144px">
                    <asp:Label ID="Label3" runat="server" Text="Supervisor de Venta:" 
                        Font-Bold="True" ForeColor="Black"></asp:Label>
                </td>
                <td style="height: 30px" width="280">
                    <dx:ASPxComboBox ID="cboSupervisor" runat="server" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue" Height="30px" Spacing="0" 
                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                        Width="300px" IncrementalFilteringMode="Contains" AutoPostBack="True" 
                        onselectedindexchanged="cboSupervisor_SelectedIndexChanged">
                        <ItemStyle Height="30px" />
                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                        </LoadingPanelImage>
                        <LoadingPanelStyle ImageSpacing="5px">
                        </LoadingPanelStyle>
                        <DropDownButton Width="20px">
                        </DropDownButton>
                        <ButtonStyle Width="13px">
                        </ButtonStyle>
                        <Paddings PaddingLeft="5px" />
                    </dx:ASPxComboBox>
                </td>
            </tr>
            <tr>
                <td style="width: 161px" height="5">
                    &nbsp;</td>
                <td height="5">
                    &nbsp;</td>
                <td style="width: 52px" height="5">
                    &nbsp;</td>
                <td height="5">
                    &nbsp;</td>
                <td style="width: 144px" height="5">
                    &nbsp;</td>
                <td height="5">
                    &nbsp;</td>
            </tr>
        </table>


            <dx:ASPxGridView ID="gv" runat="server" AutoGenerateColumns="False" 
                                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                        
    CssPostfix="Office2010Blue" KeyFieldName="PK" OnRowDeleting="gv_RowDeleting" 
                                                        Width="100%" Font-Size="8pt">
                <Columns>
                    <dx:GridViewCommandColumn ButtonType="Image" Caption="Eliminar" 
                                                                VisibleIndex="9" Width="50px">
                        <DeleteButton Visible="True">
                            <Image Url="~/Images/delete.png">
                            </Image>
                        </DeleteButton>
                        <ClearFilterButton Visible="True">
                        </ClearFilterButton>
                    </dx:GridViewCommandColumn>
                    <dx:GridViewDataTextColumn Caption="Supervisor de Venta" FieldName="Vendedor" 
                                                                VisibleIndex="3" Width="150px">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn Caption="Cliente" VisibleIndex="5" 
                                                                FieldName="DES_CLIENTE" 
                        Width="400px">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn Caption="Departamento" FieldName="Departamento" 
                                                                VisibleIndex="6" Width="120px">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn Caption="Provincia" FieldName="Provincia" 
                                                                VisibleIndex="7" Width="120px">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn Caption="Distrito" FieldName="Distrito" 
                                                                VisibleIndex="8" Width="120px">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn Caption="Código Cliente" FieldName="COD_CLIENTE" 
                                                                VisibleIndex="4" Width="100px">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn Caption="ID_CLIENTE" FieldName="ID_CLIENTE" 
                                                                Visible="False" VisibleIndex="0">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn Caption="ID_ORG_VTA" FieldName="ID_ORG_VTA" 
                                                                Visible="False" VisibleIndex="12">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn Caption="ID_CANAL_DISTRIB" 
                                                                FieldName="ID_CANAL_DISTRIB" 
                        Visible="False" VisibleIndex="11">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn Caption="ID_VENDEDOR" FieldName="ID_VENDEDOR" 
                                                                Visible="False" VisibleIndex="10">
                    </dx:GridViewDataTextColumn>
                </Columns>
                <SettingsBehavior AllowDragDrop="False" AllowGroup="False" 
                                                            ConfirmDelete="True" 
                    AllowFocusedRow="True" AllowSelectByRowClick="True" 
                                                            AllowSelectSingleRowOnly="True" />
                <SettingsPager PageSize="20" Mode="ShowAllRecords">
                </SettingsPager>
                <Settings ShowGroupButtons="False" ShowHeaderFilterBlankItems="False" 
                                                            ShowFilterRow="True" 
                    ShowVerticalScrollBar="True" VerticalScrollableHeight="460" />
                <SettingsText ConfirmDelete="¿Seguro de eliminar?" />
                <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                    <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                    </LoadingPanelOnStatusBar>
                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                    </LoadingPanel>
                </Images>
                <ImagesFilterControl>
                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                    </LoadingPanel>
                </ImagesFilterControl>
                <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                            CssPostfix="Office2010Blue">
                    <Header ImageSpacing="5px" SortingImageSpacing="5px" CssClass="fila">
                    </Header>
                    <LoadingPanel ImageSpacing="5px">
                    </LoadingPanel>
                </Styles>
                <StylesPager>
                    <PageNumber ForeColor="#3E4846">
                    </PageNumber>
                    <Summary ForeColor="#1E395B">
                    </Summary>
                </StylesPager>
                <StylesEditors ButtonEditCellSpacing="0">
                    <ProgressBar Height="21px">
                    </ProgressBar>
                </StylesEditors>
            </dx:ASPxGridView>


    </div>
</asp:Content>
